package com.basics.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * redis key 集合
 */
@Getter
@AllArgsConstructor
public enum RedisKeyEnum {

    REDIS_KEY_STORE("fg:rank:mode:%s:store:%s","方格大战门店排名key"),
    REDIS_KEY_NATIONAL("fg:rank:mode:%s:national","方格大战全国排名key");


    private String code;
    private String desc;

    public static String getDescByCode(String code){
        for (RedisKeyEnum fgGameModeEnum : RedisKeyEnum.values()){
            if (fgGameModeEnum.getCode().equals(code)){
                return fgGameModeEnum.getDesc();
            }
        }
        return "";
    }
}
